/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package BoardAttribute;

import java.util.Random;
import javax.swing.JLabel;

/**
 *
 * @author User
 */
public class Dadu extends Thread{
    private int nilai;
    private JLabel labelDadu; 

    public Dadu(JLabel labelDadu) {
        this.labelDadu = labelDadu;
    }
    
    public void run(){
        Random rd = new Random(); 
        nilai = rd.nextInt(6)+1;
        labelDadu.setText(nilai+"");
    }
}
